﻿//定义组织结构数据模型
Ext.define
(
    'Organization',
    {
    	extend: 'Ext.data.Model',
    	fields: ['ID', 'Name'],
    	idProperty: 'ID'
    }
);

//定义账号列表行数据模型
Ext.define
(
    'AccountListRow',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'UserID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'LoginName', type: 'string' },
            { name: 'UserName', type: 'string' },
            { name: 'IsEnabled', type: 'boolean' },
            { name: 'IsBuildin', type: 'boolean' },
            { name: 'LastLoginTime', type: 'date' },
            { name: 'IsAllowDelay', type: 'boolean' },
            { name: 'DelayBeginDate', type: 'date' },
            { name: 'DelayEndDate', type: 'date' },
            { name: 'DelayExpiration', type: 'date' },
            { name: 'Memo', type: 'string' }
        ],
    	idProperty: 'UserID'
    }
);

//定义账户详细信息数据模型
Ext.define
(
    'AccountDetail',
    {
    	extend: 'Ext.data.Model',
    	fields: ['UserID', 'Roles', 'OrganizationID', 'UserName', 'LoginName', 'Password', 'ConfirmPassword', 'IsEnabled', 'IsBuildin', 'Memo'],
    	idProperty: 'UserID'
    }
);

//定义字典项目数据模型
Ext.define
(
    'DictionaryItemListRow',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'ItemID', type: 'string' },
            { name: 'DictionayID', type: 'number' },
            { name: 'ItemName', type: 'string' },
            { name: 'ItemValue', type: 'string' },
            { name: 'ItemPinYin', type: 'string' }
        ],
    	idProperty: 'ItemID'
    }
);

//定义树形字典数据模型
Ext.define
(
    'TreeNodeData',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'id', type: 'string' },
            { name: 'parentID', type: 'string' },
            { name: 'code', type: 'string' },
            { name: 'name', type: 'string' },
            { name: 'category', type: 'number' },
            { name: 'categoryName', type: 'string' },
            { name: 'pinyin', type: 'string' },
            { name: 'unit', type: 'string' },
            { name: 'leaf', type: 'boolean' },
            { name: 'expanded', type: 'boolean' },
            { name: 'data', type: 'array' },
            { name: 'iconCls', type: 'string' }
        ],
    	idProperty: 'id'
    }
);

//定义简单树形数据模型


 //定义水情数据模型
Ext.define
(
    'StationWaterListRow',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'st_code', type: 'string' },
            { name: 'name', type: 'string' },
            { name: 'dt', type: 'date' },
            { name: 'w_flow', type: 'number' },
            { name: 'w_level', type: 'number' },
            { name: 'dtsource', type: 'number' }
        ],
    	idProperty: 'code'
    }
);